# Copyright (C) Kumo inc. and its affiliates.
# Author: Jeff.li lijippy@163.com
# All rights reserved.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <https:#www.gnu.org/licenses/>.
#

kmcmake_cc_test(
        NAME parquet_page_reader_test
        MODULE dwio
        SOURCES
        parquet_page_reader_test.cpp
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        -fno-access-control
        LINKS
        pollux::pollux_static
        pollux::pollux_testing_static
        GTest::gtest
        GTest::gtest_main
        ${KMCMAKE_DEPS_LINK}
)

kmcmake_cc_test(
        NAME parquet_e2e_filter_test
        MODULE dwio
        SOURCES
        e2e_filter_test.cpp
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        -fno-access-control
        LINKS
        pollux::pollux_static
        pollux::pollux_testing_static
        GTest::gtest
        GTest::gtest_main
        ${KMCMAKE_DEPS_LINK}
)


kmcmake_cc_library(
        NAMESPACE ${PROJECT_NAME}
        NAME parquet_reader_benchmark
        SOURCES
        parquet_reader_benchmark.cpp
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        PLINKS
        pollux::pollux_static
        pollux::pollux_testing_static
        GTest::gtest
        ${KMCMAKE_DEPS_LINK}
)

kmcmake_cc_test(
        NAME parquet_reader_test
        MODULE dwio
        SOURCES
        parquet_reader_test.cpp
        parquet_reader_benchmark_test.cpp
        bloom_filter_test.cpp
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        -fno-access-control
        LINKS
        pollux::pollux_static
        pollux::pollux_testing_static
        pollux::parquet_reader_benchmark_static
        GTest::gtest
        GTest::gtest_main
        ${KMCMAKE_DEPS_LINK}
)


kmcmake_cc_test(
        NAME nested_structure_decoder_test
        MODULE dwio
        SOURCES
        nested_structure_decoder_test.cpp
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        -fno-access-control
        LINKS
        pollux::pollux_static
        pollux::pollux_testing_static
        GTest::gtest
        GTest::gtest_main
        ${KMCMAKE_DEPS_LINK}
)

kmcmake_cc_test(
        NAME parquet_table_scan_test
        MODULE dwio
        SOURCES
        parquet_table_scan_test.cpp
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        -fno-access-control
        LINKS
        pollux::pollux_static
        pollux::pollux_testing_static
        GTest::gtest
        GTest::gtest_main
        ${KMCMAKE_DEPS_LINK}
)


kmcmake_cc_test(
        NAME parquet_rle_bp_decoder_test
        MODULE dwio
        SOURCES
        rle_bp_decoder_test.cpp
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        -fno-access-control
        LINKS
        pollux::pollux_static
        pollux::pollux_testing_static
        GTest::gtest
        GTest::gtest_main
        ${KMCMAKE_DEPS_LINK}
)
